CuDoubleSidedScannerC  1.22
dss_Error.h
Go to the documentation of this file.
1 // File Revision
2 // Rev 1.06
3 //
4 // Rev. notes:
5 // - rel 1.00: first release
6 // - rel 1.01: added DssResult_RequestNotSupported
7 // - rel 1.05: added DssResult_VoidTicketNotPresent and DssResult_VoidPrintHeadError
8 // - rel 1.06: added DssResult_RequestedDataNoLongerAvailable
9 // - rel 1.07: added DssResult_DoubleSheet
10 // NOTE: Please DO NOT EDIT THIS FILE
11 
16 
17 #ifndef _COMMON_ERROR_H__
18 #define _COMMON_ERROR_H__
19 
20 
24 typedef enum : DWORD
25 {
28 
31 
34 
37 
40 
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
94 
97 
100 
103 
106 
109 
112 
115 
118 
121 
124 
127 
130 
133 
136 
139 
142 
145 
148 } DssResult;
149 
150 
151 
152 
153 // Hide in documentation
155 
156 typedef struct
157 {
158  DssResult dssError;
159  const wchar_t* strDescription;
160 } ErrorType;
161 
162 //Errors List Size
163 #define ERROR_DSS_LISTSIZE sizeof(ERROR_DSS_LIST)/sizeof(ErrorType)
164 
165 //Errors List description
166 const ErrorType ERROR_DSS_LIST[] = {
167  // Error // Error Descrition
168  { DssResult_OK, L"Ok." },
169  { DssResult_ScannerOffline, L"Device not found. Maybe it is offline." },
170  { DssResult_InvalidParameter, L"Invalid parameter." },
171  { DssResult_OpenDeviceError, L"Open device error. Device probably offline." },
172  { DssResult_NullPointer, L"Null or invalid pointer." },
173  { DssResult_SmallBuffer, L"Small buffer." },
174  { DssResult_NotInitialized, L"Library not initialized." },
175  { DssResult_InvalidDeviceID, L"Invalid device ID." },
176  { DssResult_DeviceNotOpened, L"Device is closed. Did you forget ConnectScanner?" },
177  { DssResult_NoDeviceAnswer, L"The device doesn't answer." },
178  { DssResult_WriteError, L"Write error." },
179  { DssResult_JobNotValid, L"Scan job not valid. Maybe a ConnectScanner is needed." },
180  { DssResult_ScanJobOpenError, L"Scan job open error." },
181  { DssResult_InvalidCommand, L"Invalid command." },
182  { DssResult_DeviceAnswerUnknown, L"Device answer unknown." },
183  { DssResult_NoDocumentScanned, L"No document has been scanned for this side." },
184  { DssResult_SyncronizationErr, L"Communication syncronization error" },
185  { DssResult_NoDocumentToBeScanned, L"No document has been inserted to be scanned." },
186  { DssResult_PaperJam, L"Paper jam." },
187  { DssResult_PaperHeldBack, L"The paper has been held back by the user." },
188  { DSSResult_ScannerJam, L"It is not possible to perform or complete the current operation. Scanner jam state." },
189  { DssResult_ScannerError, L"Scanner answer is an error code, or the scanner is in an error state." },
190  { DssResult_CommunicationUnknownError, L"Communication unknown error." },
191  { DssResult_RequestNotSupported, L"The request is not supported by the current device. Request not available." },
192  { DssResult_LibraryAlreadyInitialized, L" The library has already been initialized. Please deinitilize library before re-initialize it." },
193  { DssResult_ScannerBusy, L"The scanner is busy. Probably a scan job is in progress." },
194  { DssResult_ErrCoverOpen, L"Impossible to perform the requested operation. The scanner cover is open." },
195  {DssResult_ScanInconsistentData, L" Data returned by the last/current scan job are inconsistent"},
196  {DssResult_ScanImpeded , L"A trouble impeded to perform a correct scan. (Scan timeout or power supply error)"},
197  {DssResult_MICRNotFound, L"Magnetic ink character recognition failed. Data not found or not detected" },
198  {DssResult_MICRDetectInProgress, L"Magnetic ink character recognition in progress." },
199  {DssResult_UpgFileOpenError , L"Upgrade error: upgrade file not found" },
200  {DssResult_UpgBootImageTagMissed , L"Upgrade error: boot image tag missed" },
201  {DssResult_UpgAcceptLenNotMatch , L"Upgrade error: upgrade file accept length not match" },
202  {DssResult_UpgImageWriteError , L"Upgrade error: error in writing upgrade data on scanner" },
203  {DssResult_UpgChecksumError , L"Upgrade error: file checksum error" },
204  {DssResult_UpgWrongFileFormatError, L"Upgrade error: file inconsistent. Wrong file format"},
205  { DssResult_VoidTicketNotPresent, L" Void ticket: paper not present on print head. Cannot continue" },
206  { DssResult_VoidPrintHeadError, L"Void ticket: print head is down. This situation will cause troubles during the next scan job" },
207  { DssResult_RequestedDataNoLongerAvailable, L"The data requested are no longer available" },
208  { DssResult_DoubleSheet, L"It is not possible to perform or complete the current operation. Scanner found double sheet" },
209 
210 };
211 
212 // @endcond
213 
214 
222 static const wchar_t* DssResultToText(DssResult result)
223 {
224  DWORD i;
225 
226  for (i = 0; i<ERROR_DSS_LISTSIZE; i++)
227  {
228  if (ERROR_DSS_LIST[i].dssError == result)
229  return ERROR_DSS_LIST[i].strDescription;
230  }
231 
232  return L"";
233 }
234 
235 
236 #endif
No document has been inserted to be scanned.
Definition: dss_Error.h:78
Null or invalid pointer.
Definition: dss_Error.h:42
The device doesn't answer.
Definition: dss_Error.h:54
Communication unknown error.
Definition: dss_Error.h:93
Scanner answer is an error code, or the scanner is in an error state.
Definition: dss_Error.h:90
A trouble impeded to perform a correct scan. (Scan timeout or power supply error)
Definition: dss_Error.h:111
Device is closed.Did you forget ConnectScanner?
Definition: dss_Error.h:51
Magnetic ink character recognition in progress.
Definition: dss_Error.h:117
Scan job not valid. Maybe a ConnectScanner is needed.
Definition: dss_Error.h:60
Magnetic ink character recognition failed. Data not found or not detected.
Definition: dss_Error.h:114
Invalid parameter.
Definition: dss_Error.h:36
All OK.
Definition: dss_Error.h:27
Upgrade error: checksum error.
Definition: dss_Error.h:132
The request is not supported by the current device. Request not available.
Definition: dss_Error.h:96
Upgrade error: upgrade file accept length not match.
Definition: dss_Error.h:126
Impossible to perform the requested operation. The scanner cover is open.
Definition: dss_Error.h:105
Invalid device ID.
Definition: dss_Error.h:48
Communication syncronization error.
Definition: dss_Error.h:75
Upgrade error: file inconsistent. Wrong file format.
Definition: dss_Error.h:135
Small buffer.
Definition: dss_Error.h:39
DssResult
Definition: dss_Error.h:24
Upgrade error: upgrade file not found.
Definition: dss_Error.h:120
The data requested are no longer available.
Definition: dss_Error.h:144
The paper has been held back by the user.
Definition: dss_Error.h:84
Device answer unknown.
Definition: dss_Error.h:69
Upgrade error: error in writing upgrade data on scanner.
Definition: dss_Error.h:129
Scan job open error.
Definition: dss_Error.h:63
Void ticket: paper not present on print head. Cannot continue.
Definition: dss_Error.h:138
Library not initialized.
Definition: dss_Error.h:45
Invalid command.
Definition: dss_Error.h:66
Data returned by the last/current scan job are inconsistent.
Definition: dss_Error.h:108
The scanner is busy. Probably a scan job is in progress.
Definition: dss_Error.h:102
Upgrade error: boot image tag missed.
Definition: dss_Error.h:123
Scanner offline.
Definition: dss_Error.h:30
It is not possible to perform or complete the current operation. Scanner found double sheet.
Definition: dss_Error.h:147
static const wchar_t * DssResultToText(DssResult result)
Definition: dss_Error.h:222
No document has been scanned for this side.
Definition: dss_Error.h:72
Paper jam.
Definition: dss_Error.h:81
Open device error. Device probably offline.
Definition: dss_Error.h:33
Write error.
Definition: dss_Error.h:57
Void ticket: print head is down. This situation will cause troubles during the next scan job.
Definition: dss_Error.h:141
It is not possible to perform or complete the current operation. Scanner jam state.
Definition: dss_Error.h:87
The library has already been initialized. Please deinitilize library before re-initialize it.
Definition: dss_Error.h:99